package File;

import java.io.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LXW
 * Date: 2022-04-04
 * Time: 14:02
 */
public class Demo15 {
    public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {
        OutputStream outputStream = new FileOutputStream("hello-world");
        OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream,"utf-8");
        PrintWriter printWriter = new PrintWriter(outputStreamWriter);
        printWriter.write("你好世界");
        printWriter.flush();
    }
}
